<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

</body>
<script>
    //onload 方法
    let xhr = new XMLHttppRequestst;
    xhr.open('get','../server/01.test.php',true);
    xhr.send();

    xhr.onload = () =>{
        if(xhr.status == 200){
            console.log("success",xhr.responseText);
        }else{
            console.log("error",xhr.responseText)
        }
    }
</script>

</html>